<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel common\models\mdm\MdmEmployeeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('app', 'Mdm Employees');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="mdm-employee-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a(Yii::t('app', 'Create Mdm Employee'), ['create'], ['class' => 'btn btn-success']) ?>
        <?= Html::a(Yii::t('app', 'Sync Mdm Employee'), ['sync-mdm-employee'], ['class' => 'btn btn-primary', 'target'=>'_blank']) ?>
    </p>
    <?php
    try {
        $gv = GridView::widget([
            'tableOptions' => ['class' => 'table table-condensed table-bordered table-striped table-hover'],
            'pager' => [
//            'class'          => GoPager::className(),
                'nextPageLabel'  => Yii::t('app', 'Next Page'),
                'prevPageLabel'  => Yii::t('app', 'Previous Page'),
                'firstPageLabel' => Yii::t('app', 'First Page'),
                'lastPageLabel'  => Yii::t('app', 'Last Page'),
                'options' => [
                    'class' => 'pagination pagination-sm m-t-none m-b-none',
                ],
            ],
            'dataProvider' => $dataProvider,
            'filterModel' => $searchModel,
            'columns' => [
                ['class' => 'yii\grid\ActionColumn'],
                [
                    'class' => 'yii\grid\CheckboxColumn',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 30px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 30px;'],
                    'name' => 'id',
                ],
                [
                    'attribute' => 'BILLCODE',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
//            'PK_ORG',
//            'PK_GROUP',
//            'PK_ORG_V',
//            'PK_PERSONNEL',
//            'CREATOR',
                // 'CREATIONTIME',
                // 'MODIFIER',
                // 'MODIFIEDTIME',
                // 'VAPPROVEID',
                // 'DAPPROVEDATE',
                // 'VAPPROVENOTE',
//             'BILLCODE',
                // 'BILLSTATUS',
                // 'TRANSTYPE',
                // 'TRANSTYPEID',
                // 'PK_BILLTYPE',
                // 'PK_BUSITYPE',
                // 'PK_DEF1',
                // 'PK_DEF2',
                // 'PK_DEF3',
                // 'PK_DEF4',
                // 'PK_DEF5',
                // 'VVDEF1',
                // 'VVDEF2',
                // 'VVDEF3',
                // 'VVDEF4',
                // 'VVDEF5',
                // 'VVDEF6',
                // 'VVDEF7',
                // 'VVDEF8',
                // 'VVDEF9',
                // 'VVDEF10',
                // 'VVDEF11',
                // 'VVDEF12',
                // 'VVDEF13',
                // 'VVDEF14',
                // 'VVDEF15',
                // 'IDEF1',
                // 'IDEF2',
                // 'IDEF3',
                // 'IDEF4',
                // 'IDEF5',
                // 'NDEF1',
                // 'NDEF2',
                // 'NDEF3',
                // 'NDEF4',
                // 'NDEF5',
                // 'DDEF1',
                // 'DDEF2',
                // 'DDEF3',
                // 'DDEF4',
                // 'DDEF5',
                // 'BDEF1',
                // 'BDEF2',
                // 'BDEF3',
                // 'BDEF4',
                // 'BDEF5',
//                'PRESONCODE',
//                'PERSONNAME',
//                'PERSONSEX',
//                'PERSONID',
//                'BIRTHDATE',
//                'PERSONDEPART',
//                'PERSONPOST',
//                'PERSONDUTY',
//                'PERSONRANK',
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PRESONCODE',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PERSONNAME',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PERSONSEX',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PERSONID',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'BIRTHDATE',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PERSONDEPART',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PERSONPOST',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PERSONDUTY',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                [
//                    'label' => Yii::t('app', 'ID'),
                    'attribute' => 'PERSONRANK',
                    'headerOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                    'contentOptions' => ['class' => 'vertical-middle text-center', 'style' => 'width: 80px;'],
                ],
                // 'ISNOTUSE',
                // 'NOTUSEDATE',
                // 'NOTUSEMAN',
                // 'SSORG',
                // 'TS',
                // 'DR',
            ],
        ]);
    } catch (Exception $e) {
    }
    ?>
    <?= $gv ?>
</div>
